﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace Marbles.Core.Modules
{   
    public class SecurityModule : IHttpModule
    {
        public void Dispose()
        {
        }

        public void Init(HttpApplication context)
        {
            context.PreSendRequestHeaders += new EventHandler(context_PreSendRequestHeaders);
        }

        private void context_PreSendRequestHeaders(object sender, EventArgs e)
        {
            var context = ((HttpApplication)sender).Context;
            context.Response.Headers.Set("Server", "Marbles ContentServer");
            context.Response.Headers.Set("X-Powered-By", "Marbles CMS");
            HttpContext.Current.Response.Headers.Set("X-AspNet-Version", "");
        }
    }
} 